<template>
  <div class="panel">
    <slot name="header"></slot>
    <div class="config-box">
      <slot name="tip"></slot>
      <div class="params">
        <slot name="config"></slot>
        <slot name="chartBtn"></slot>
      </div>
    </div>
    <div class="chart-box">
      <slot name="chart"></slot>
    </div>
  </div>
</template>

<script>
export default {
}
</script>

<style lang="scss" scoped>
.panel {
  position: relative;
  width: 100%;
  margin-bottom: .2rem;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  background-color: $color2;
  .header {
    position: relative;
    width: 100%;
    height: .5rem;
    line-height: .5rem;
    padding-left: .1rem;
    padding-right: .2rem;
    border-bottom: 1px solid $color115;
    .iconfont {
      position: absolute;
      top: 0;
      left: .1rem;
      display: inline-block;
      width: .36rem;
      font-size: .2rem;
      text-align: center;
      vertical-align: middle;
      color: $color121;
    }
    h4 {
      padding-left: .36rem;
      padding-right: 2rem;
      font-weight: normal;
      font-size: .14rem;
      color: $color121;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .tools {
      position: absolute;
      top: 0;
      right: .2rem;
      display: flex;
      align-items: center;
      justify-content: center;
      height: .5rem;
    }
    button {
      position: relative;
      width: 1.05rem;
      height: .31rem;
      border-radius: 15px;
      margin-left: .1rem;
      box-sizing: border-box;
      font-size: .14rem;
      color: $color116;
      background-color: transparent;
      cursor: pointer;
      i {
        margin-right: 2px;
      }
      &:hover {
        border-color: $color121;
        color: $color2;
        background-color: $color121;
      }
    }
  }
  .config-box {
    position: relative;
    padding: .1rem .2rem;
    .tip {
      line-height: .26rem;
      margin-bottom: .1rem;
      font-size: .14rem;
      color: $color122;
    }
    .params {
      position: relative;
      display: flex;
      justify-content: space-between;
      .date-box {
        position: relative;
        display: inline-block;
        margin-right: .2rem;
        font-size: .14rem;
        .tit {
          display: inline-block;
          padding-right: .14rem;
          font-size: .14rem;
          color: $color122;
        }
        .search-time {
          display: inline-flex;
          align-items: center;
          .picker-box {
            position: relative;
            display: inline-block;
            .el-date-picker {
              position: relative;
              width: 1.4rem !important;
              min-width: 120px;
              height: .3rem;
              ::v-deep {
                .el-input__inner {
                  height: .3rem;
                  line-height: .3rem;
                  padding-left: .15rem;
                  border: 0;
                  font-size: .14rem;
                  background-color: $color123;
                }
              }
            }
            .icon {
              position: absolute;
              top: 0;
              right: .1rem;
              line-height: .32rem;
              font-size: .18rem;
              color: $color6;
            }
          }
          .split {
            position: relative;
            display: inline-block;
            width: .1rem;
            margin: 0 .1rem;
            &:before {
              position: absolute;
              top: 60%;
              left: 0;
              width: 100%;
              height: 1px;
              background-color: $color6;
              content: '';
            }
          }
        }
      }
      .select-box {
        position: relative;
        display: inline-block;
        margin-right: .2rem;
        font-size: .14rem;
        .tit {
          display: inline-block;
          padding-right: .14rem;
          font-size: .14rem;
          color: $color122;
        }
        .select {
          width: 1.4rem;
          ::v-deep {
            .el-input__inner {
              padding-left: .15rem;
              border: 0;
              font-size: .14rem;
              background-color: $color123;
            }
          }
          // .el-input__inner {
          //   border: 0;
          //   background-color: $bodyColor;
          // }
        }
      }
      .chart-btn {
        position: relative;
        .el-button {
          width: .32rem;
          height: .32rem;
          line-height: .32rem;
          padding: 0;
          margin-left: .1rem;
          font-size: .16rem;
          &.active {
            border-color: $color121;
            color: $color2;
            background-color: $color121;
          }
        }
      }
    }
  }
  .chart-box {
    position: relative;
    width: 100%;
    &:before {
      display: block;
      width: 100%;
      padding-top: calc(100%/3);
      content: " ";
    }
    .chart {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: $color2;
    }
  }
}
</style>